
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>亚马逊-首页</title>
<script src="${pageContext.request.contextPath}/scripts/jquery-2.1.0.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	var len=$("#ppp").children().length;
	$("#ppp").children().hover(function(){
		$(this).css("border","2px solid red");
		$(this).css("background","pink");
	},function(){
		$(this).css("border","2px solid pink");
		$(this).css("background","");
	});
});

</script>
</head>
<body>
	<%@ include file="index_top.jsp"%>
	<div id="middle" style="width:1000px;border:3px solid #EDEDED;">
		<div class="p_center">
			<div class="p_list">
				<div class="p_info">
					<img src="images/icon_sale.png"/>商品列表 
				</div>
			</div>

			<ul class="product2" id="ppp" style="width:1000px;">
				<c:if test="${requestScope.pageModel.pageCount==0}">
					<h4>找不到您搜索的商品!</h4>
				</c:if>
			 	<c:set value="${requestScope.pageModel.recordList}" var="products"></c:set>
			 	
				<c:forEach items="${products}" var="p">
					<li style="border:2px solid pink;font-size:15px; text-shadow:2px 2px 2px green; margin-right:37px;width:200px;">
						<dl>
							<dt>
								<a href="${pageContext.request.contextPath }/PviewServlet?pId=${p.hp_id}" target="_self">
								<img src="${p.hp_file_name}" /></a>
							</dt>
							<dd class="title">
								<a href="${pageContext.request.contextPath }/PviewServlet?pId=${p.hp_id}" target="_self">${p.hp_name}</a>
							</dd>
							<dd class="price">￥${p.hp_price}</dd>
						</dl>
					</li>
				</c:forEach>
			</ul>
			
			 <div class="pager" style="width:980px;">
				<ul style="float:right;">
					<ul>
					<c:if test="${requestScope.pageModel.pageCount!=0}">
					<span style="float:right;">第${pageModel.currentPage}/${requestScope.pageModel.pageCount}页</span>&nbsp;
					<li>
					<a href="${pageContext.request.contextPath}/SearchServlet?searchValue=${sessionScope.serValue }&pageNow=${pageModel.currentPage<2?1:pageModel.currentPage-1}" id="lastPage">上一页</a></li>
					
				    <c:forEach var="pl" begin="1" end="${requestScope.pageModel.pageCount}" varStatus="i">
						<li><a href="${pageContext.request.contextPath}/SearchServlet?searchValue=${sessionScope.serValue }&pageNow=${pl}&src=${requestScope.pageModel.status}&hpcId=${requestScope.pageModel.recordList[pl].hpc_id}">${pl }</a></li>
					</c:forEach> 
					
					<li><a href="${pageContext.request.contextPath}/SearchServlet?searchValue=${sessionScope.serValue }&pageNow=${pageModel.currentPage>=pageModel.pageCount?pageModel.pageCount:pageModel.currentPage+1}" id="nextPage">下一页</a></li>
					</c:if>
					</ul>
				</ul>
			 </div>
		</div>
	</div>

	<div id="foot">Copyright © 2016 上海海文 All Rights Reserved.</div>
</body>
</html>

